The present invention relates to data recording and reproducing method and apparatus using a plurality of data recording and reproducing units, and a computer-readable recording medium. More specifically, the present invention is directed to data recording and reproducing method and apparatus using a plurality of recording and reproducing means that, at the time of data recording, produces pieces of second data by dividing supplied first data and adds an error correction code to the pieces of second data, allocates and records the pieces of second data and the error correction code to and in the plurality of recording and reproducing units, respectively, and that, at the time of data reproduction, reproduces the first data by synthesizing the pieces of second data read from the plurality of recording and reproducing units.
Known as a highly reliable data recording and reproducing apparatus having a large storage capacity is, e.g., a disk array (RAID or Redundant Array of Inexpensive Disks) unit that controls a plurality of data recording and reproducing units such as hard disk drives (hereinafter referred to as xe2x80x9cHDD(s)xe2x80x9d) arranged in parallel to one another as if the HDDs were handled as a single disk unit.
To record data using such a disk array unit, the data to be recorded is divided, and the divided pieces of data are sequentially and cyclically allocated to and recorded in the plurality of HDDS. Further, an operation is performed to obtain a parity based on the divided pieces of data recorded in the plurality of HDDs. In a RAID level 3 or 4 system, the obtained parity is recorded in a single fixed HDD. In a RAID level 5 system, the obtained parities are regularly distributed to the respective HDDs.
To reproduce the data from the divided pieces of data recorded in the plurality of HDDS, the pieces of data read from the plurality of HDDs are subjected to an error detection correction using the recorded parity, and the resultant pieces of data are synthesized and outputted. Further, when a fault occurs at the disk array unit, a rebuilt process is performed. In the rebuild process, a faulty HDD is replaced with a new HDD and a piece of data recorded in the faulty HDD is written to the new HDD using the parity.
Since the disk array unit records data using a plurality of HDDs as described above, a large volume of data can be recorded. Further, since parity is used to make error detection correction and the rebuild process is performed to write back a piece of data to a newly replaced HDD, high reliability can be assured (prior art (1)). One such example is disclosed in U.S. Pat. No. 4,870,643.
Further, such a disk array unit reserves an auxiliary HDD. Therefore, when a fault occurs at an HDD, a so-called xe2x80x9chot standbyxe2x80x9d technique using the auxiliary HDD is utilized (prior art (2)). That is, a piece of data recorded in the faulty HDD is recovered by using pieces of data and a parity recorded in the faultless HDDS, and the recovered piece of data is recorded in the auxiliary HDD. In this technique, the data is thereafter recorded or reproduced by using the pieces of data recorded in the faultless HDDS and the piece of data recorded in the auxiliary HDD. Further, when the faulty HDD is replaced with a new HDD, the replaced HDD is reserved as the auxiliary HDD.
Since such a disk array unit records data in a plurality of HDDs as described above, a large volume of data can be recorded. In addition, since a parity is used to make error detection correction and an auxiliary HDD is reserved, high reliability can be assured.
By the way, the prior art (1) addresses the following problem. When a first fault occurs at the disk array unit, and if a second fault then occurs at another HDD during a period between the replacement of the faulty HDD with a new HDD and the completion of a rebuild process, then a piece of data in the second faulty HDD cannot be recovered by using a parity. Therefore, the recorded data cannot be read correctly.
Further, the prior art (2) in which the disk array unit has an auxiliary HDD also addresses the following problem. When a second fault occurs at an HDD during a period in which data is being recorded or reproduced using the auxiliary HDD and in which a first faulty HDD has not yet been replaced with a new HDD, a piece of data in the second faulty HDD can be recovered by using a parity. However, if a third fault occurs at an HDD, a piece of data in the third faulty HDD cannot be recovered by using a parity. Therefore, the recorded data cannot be read correctly.
An object of the present invention is to provide data recording and reproducing method and apparatus that can overcome the aforementioned problems addressed by the conventional data recording and reproducing method and apparatus.
Another object of the present invention is to provide data recording and reproducing method and apparatus that can improve reliability.
A first aspect of the present invention provides a data recording and reproducing method using a plurality of recording and reproducing means in which, at the time of data recording, pieces of second data are produced by dividing supplied first data and an error correction code is generated for the pieces of second data, and the pieces of second data and the error correction code are allocated to and recorded in the plurality of recording and reproducing means, respectively, and in which, at the time of data reproduction, the first data is reproduced by synthesizing the pieces of second data read from the plurality of recording and reproducing means. The method comprises the steps of: when a fault occurs at one of the plurality of recording and reproducing means (hereinafter referred to as the xe2x80x9cfaulty recording and reproducing meansxe2x80x9d), if one of the pieces of second data is recorded in the faulty recording and reproducing means, reproducing the first data by reading the pieces of second data and the error correction code recorded in the plurality of recording and reproducing means excluding the faulty recording and reproducing means (hereinafter referred to as the xe2x80x9cfaultless recording and reproducing meansxe2x80x9d), and if one of the pieces of second data is not recorded in the faulty recording and reproducing means, reproducing the first data by reading the pieces of second data recorded in the plurality of faultless recording and reproducing means; and producing new pieces of second data by dividing the reproduced first data and generating a new error correction code, and allocating and recording the new pieces of second data and the new error correction code to and in the plurality of faultless recording and reproducing means, respectively.
The first aspect of the present invention further provides a data recording and reproducing apparatus using a plurality of recording and reproducing means, which apparatus comprises: a plurality of recording and reproducing means; data processing means that, at the time of data recording, produces pieces of second data by dividing supplied first data and generates an error correction code, and allocates and records the pieces of second data and the error correction code to and in the plurality of recording and reproducing means, respectively, and that, at the time of data reproduction, reproduces the first data by synthesizing the pieces of second data read from the plurality of recording and reproducing means; and operation control means that, when a fault occurs at one of the plurality of recording and reproducing means (hereinafter referred to as the xe2x80x9cfaulty recording and reproducing meansxe2x80x9d), controls the data processing means, if one of the pieces of second data is recorded in the faulty recording and reproducing means, to reproduce the first data from the pieces of second data and the error correction code recorded in the plurality of recording and reproducing means excluding the faulty recording and reproducing means (hereinafter referred to as the xe2x80x9cfaultless recording and reproducing meansxe2x80x9d), and that controls the data processing means, if one of the pieces of second data is not recorded in the faulty recording and reproducing means, to reproduce the first data by reading the pieces of second data recorded in the plurality of faultless recording and reproducing means, produces new pieces of second data by dividing the reproduced first data based on a number of the plurality of faultless recording and reproducing means and generates a new error correction code, and allocates and records the new pieces of second data and the new error correction code to and in the plurality of faultless recording and reproducing means, respectively.
The first aspect of the present invention still further provides a computer-readable medium that comprises: computer-readable program code means that, at the time of data recording, produces pieces of second data by dividing supplied first data and generates an error correction code, and allocates and records the pieces of second data and the error correction code to and in a plurality of recording and reproducing means, respectively; computer-readable program code means that, at the time of data reproduction, reproduces the first data by synthesizing the pieces of second data read from the plurality of recording and reproducing means; and computer-readable program code means that, when a fault occurs at one of the plurality of recording and reproducing means (hereinafter referred to as the xe2x80x9cfaulty recording and reproducing meansxe2x80x9d), if one of the pieces of second data is recorded in the faulty recording and reproducing means, reproduces the first data by reading the pieces of second data and the error correction code recorded in the plurality of recording and reproducing means excluding the faulty recording and reproducing means (hereinafter referred to as the xe2x80x9cfaultless recording and reproducing meansxe2x80x9d), and if one of the pieces of second data is not recorded in the faulty recording and reproducing means, reproduces the first data by reading the pieces of second data recorded in the plurality of faultless recording and reproducing means, produces new pieces of second data by dividing the reproduced first data and generates a new error correction code, and allocates and records the new pieces of second data and the new error correction code to and in the plurality of faultless recording and reproducing means, respectively.
In the aforementioned invention that is organized as described above, supplied first data is divided and an error correction code is generated for the divided pieces of data, and the divided pieces of data and the error correction code are allocated to and recorded in the plurality of recording and reproducing means, respectively as pieces of second data. When a fault occurs at one of the plurality of recording and reproducing means, and if one of the pieces of second data or the error correction code cannot be read, the first data is reproduced by the pieces of second data and the error correction code or by the pieces of second data recorded in faultless recording and reproducing means. Then, the reproduced first data is divided in accordance with the faultless recording and reproducing means and an error correction code is generated for the divided pieces of data to produce new pieces of second data. The new pieces of second data are allocated to and recorded in the faultless recording and reproducing means, respectively, after it is confirmed that such new pieces of second data can be recorded in the faultless recording and reproducing means.
According to the aforementioned invention that is organized as described above, when a piece of second data cannot be read due to occurrence of a fault at one of a plurality of recording and reproducing means, first data is reproduced from the pieces of second data recorded in the faultless recording and reproducing means. Thereafter, the reproduced first data is divided in accordance with the faultless recording and reproducing means and an error correction code is generated for the divided pieces of data to produce new pieces of second data, and the new pieces of second data and the error correction code are allocated to and recorded in the faultless recording and reproducing means, respectively.
As a result, even if a fault occurs again at a recording and reproducing means, the first data can be reproduced from the new pieces of second data recorded in the faultless recording and reproducing means. Hence, reliability can be improved without increasing costs.
Further, when the second pieces of data are produced by dividing the first data, an error correction code is added to the second pieces of data. Therefore, the first data can be reproduced easily from the pieces of second data recorded in the faultless recording and reproducing means.
Still further, the new pieces of second data are recorded in the faultless recording and reproducing means after it is confirmed that the new pieces of second data can be recorded in the faultless recording and reproducing means. Therefore, the recording and reproducing means can be used efficiently to assure reliable operation.
A second aspect of the present invention provides a data recording and reproducing method using a plurality of recording and reproducing means in which, at the time of data recording, pieces of second data are produced by dividing supplied first data and an error correction code is generated, and the pieces of second data and the error correction code are allocated to and recorded in the plurality of first recording and reproducing means, respectively, and in which, at the time of data reproduction, the first data is reproduced by synthesizing the pieces of second data read from the plurality of first recording and reproducing means, and in which each of the plurality of first recording and reproducing means has a preset data recording area for recording either one of the pieces of second data or the error correction code. The method comprises the steps of: when a fault occurs at one of the plurality of first recording and reproducing means (hereinafter referred to as the xe2x80x9cfaulty first recording and reproducing meansxe2x80x9d), if one of the pieces of second data is recorded in the faulty first recording and reproducing means, reproducing the first data by reading the pieces of second data and the error correction code recorded in the plurality of first recording and reproducing means excluding the faulty first recording and reproducing means (hereinafter referred to as the xe2x80x9cfaultless recording and reproducing meansxe2x80x9d), and if one of the pieces of second data is not recorded in the faulty first recording and reproducing means, reproducing the first data by reading the pieces of second data recorded in the plurality of faultless first recording and reproducing means; and when new pieces of second data are produced by dividing the reproduced first data based on a number of the plurality of faultless first recording and reproducing means and a new error correction code is generated and the new pieces of second data and the new error correction code are allocated to the plurality of faultless first recording and reproducing means, respectively, if one of the new pieces of second data or the new error correction code cannot be written to each of the data recording areas of the plurality of faultless first recording and reproducing means, further producing new pieces of second data by dividing the reproduced first data based on a number of the plurality of faultless first recording and reproducing means and a second recording and reproducing means and further generating a new error correction code, and allocating and recording the further newly produced pieces of second data and the further newly generated error correction code to and in the plurality of faultless first recording and reproducing means and the second recording and reproducing means, respectively.
Further, in the second aspect of the present invention, at the time of data recording, pieces of second data are produced by dividing supplied first data and an error correction code is generated, and the pieces of second data and the error correction code are allocated to and recorded in the plurality of first recording and reproducing means, respectively, and at the time of data reproduction, the first data is reproduced by synthesizing the pieces of second data read from the plurality of first recording and reproducing means. When a fault occurs at one of the plurality of first recording and reproducing means (hereinafter referred to as the xe2x80x9cfaulty first recording and reproducing meansxe2x80x9d), if one of the pieces of second data is recorded in the faulty first recording and reproducing means, such one of the pieces of second data recorded in the faulty first recording and reproducing means is recovered by reading the pieces of second data and the error correction code recorded in the plurality of first recording and reproducing means excluding the faulty first recording and reproducing means (hereinafter referred to as the xe2x80x9cfaultless recording and reproducing meansxe2x80x9d), and the recovered one of the pieces of second data is recorded in a second recording and reproducing means, and thereafter the first data is reproduced by reading the pieces of second data recorded in the plurality of faultless first recording and reproducing means and the piece of second data recorded in the second recording and reproducing means, and new pieces of second data are produced by dividing the reproduced first data and a new error correction code is generated, and the new pieces of second data and the new error correction code are allocated to and recorded in the plurality of faultless first recording and reproducing means, respectively.
The second aspect of the present invention further provides a data recording and reproducing apparatus using a plurality of recording and reproducing means, which apparatus comprises: a plurality of first recording and reproducing means, each having a data recording area for recording either data or an error correction code; data processing means that, at the time of data recording, produces pieces of second data by dividing supplied first data and generates an error correction code, and allocates and records the pieces of second data and the error correction code to and in the plurality of first recording and reproducing means, respectively, and that, at the time of data reproduction, reproduces the first data from the pieces of second data and the error correction code read from the plurality of first recording and reproducing means; a second recording and reproducing means having a data recording area for recording either data or an error correction code; and operation control means that, when detecting a fault at one of the plurality of first recording and reproducing means (hereinafter referred to as the xe2x80x9cfaulty first recording and reproducing meansxe2x80x9d), controls the data processing means based on the detected result; wherein: when detecting no fault at the plurality of first recording and reproducing means, the operation control means reproduces the first data by allocating and recording the pieces of second data and the error correction code to and in the plurality of first recording and reproducing means, respectively, and by reading the pieces of second data and the error correction code allocated to and recorded in the plurality of first recording and reproducing means; when detecting the faulty first recording and reproducing means having recorded one of the pieces of second data among the plurality of first recording and reproducing means, the operation control means reproduces the first data by reading the pieces of second data and the error correction code recorded in the plurality of first recording and reproducing means excluding the faulty first recording and reproducing means (hereinafter referred to as the xe2x80x9cfaultless recording and reproducing meansxe2x80x9d); when detecting the faulty first recording and reproducing means not having recorded one of the pieces of second data among the plurality of first recording and reproducing means, the operation control means reproduces the first data by reading the pieces of second data recorded in the plurality of faultless first recording and reproducing means; and when new pieces of second data are produced by dividing the reproduced first data based on a number of the plurality of faultless first recording and reproducing means and a new error correction code is generated and the new pieces of second data and the new error correction code are allocated to the plurality of faultless first recording and reproducing means, respectively, if one of the new pieces of second data or the new error correction code cannot be written to each of the data recording areas of the plurality of faultless first recording and reproducing means, the operation control means further produces new pieces of second data by dividing the reproduced first data based on a number of the plurality of faultless first recording and reproducing means and the second recording and reproducing means and further generates a new error correction code, and allocates and records the further newly produced pieces of second data and the further newly generated error correction code to and in the plurality of faultless first recording and reproducing means and the second recording and reproducing means, respectively.
Further, the apparatus comprises: a plurality of first recording and reproducing means, each having a data recording area for recording either data or an error correction code; data processing means that, at the time of data recording, produces pieces of second data by dividing supplied first data and generates an error correction code, and allocates and records the pieces of second data and the error correction code to and in the plurality of first recording and reproducing means, respectively, and that, at the time of data reproduction, reproduces the first data from the pieces of second data and the error correction code read from the plurality of first recording and reproducing means; a second recording and reproducing means having a data recording area for recording either data or an error correction code; and operation control means that, when detecting a fault at one of the plurality of first recording and reproducing means (hereinafter referred to as the xe2x80x9cfaulty first recording and reproducing meansxe2x80x9d), controls the data processing means based on the detected result; wherein: when detecting no fault at the plurality of first recording and reproducing means, the operation control means reproduces the first data by allocating and recording the pieces of second data and the error correction code to and in the plurality of first recording and reproducing means, respectively, and by reading the pieces of second data and the error correction code allocated to and recorded in the plurality of first recording and reproducing means; when detecting the faulty first recording and reproducing means having recorded one of the pieces of second data among the plurality of first recording and reproducing means, the operation control means recovers such one of the pieces of second data recorded in the faulty first recording and reproducing means by reading the pieces of second data and the error correction code recorded in the plurality of first recording and reproducing means excluding the faulty first recording and reproducing means (hereinafter referred to as the xe2x80x9cfaultless recording and reproducing meansxe2x80x9d), and records the recovered one of the pieces of second data in the second recording and reproducing means; and the operation control means thereafter reproduces the first data by reading the pieces of second data recorded in the plurality of faultless first recording and reproducing means and the piece of second data recorded in the second recording and reproducing means, produces new pieces of second data by dividing the reproduced first data and generates a new error correction code, and allocates and records the new pieces of second data and the new error correction code to and in the plurality of faultless first recording and reproducing means, respectively.
The second aspect of the present invention still further provides a computer-readable medium that comprises: computer-readable program code means that, at the time of data recording, produces pieces of second data by dividing supplied first data and generates an error correction code, and allocates and records the pieces of second data and the error correction code to and in a plurality of first recording and reproducing means, respectively; computer-readable program code means that, at the time of data reproduction, reproduces the first data by synthesizing the pieces of second data read from the plurality of first recording and reproducing means; computer-readable program code means that, when a fault occurs at one of the plurality of first recording and reproducing means (hereinafter referred to as the xe2x80x9cfaulty first recording and reproducing meansxe2x80x9d), if one of the pieces of second data is recorded in the faulty first recording and reproducing means, reproduces the first data by reading the pieces of second data and the error correction code recorded in the plurality of first recording and reproducing means excluding the faulty first recording and reproducing means (hereinafter referred to as the xe2x80x9cfaultless recording and reproducing meansxe2x80x9d), and if one of the pieces of second data is not recorded in the faulty first recording and reproducing means, reproduces the first data by reading the pieces of second data recorded in the plurality of faultless first recording and reproducing means; and computer-readable program code means that, when new pieces of second data are produced by dividing the reproduced first data based on a number of the plurality of faultless first recording and reproducing means and a new error correction code is generated and the new pieces of second data and the new error correction code are allocated to the plurality of faultless first recording and reproducing means, respectively, if one of the new pieces of second data or the new error correction code cannot be written to each of the data recording areas of the plurality of faultless first recording and reproducing means, further produces new pieces of second data by dividing the reproduced first data based on a number of the plurality of faultless first recording and reproducing means and a second recording and reproducing means and further generating a new error correction code, and allocates and records the further newly produced pieces of second data and the further newly generated error correction code to and in the plurality of faultless first recording and reproducing means and the second recording and reproducing means, respectively.
Further, the computer-readable medium comprises: computer-readable program code means that, at the time of data recording, produces pieces of second data by dividing supplied first data and generates an error correction code, and allocates and records the pieces of second data and the error correction code to and in a plurality of first recording and reproducing means, respectively; computer-readable program code means that, at the time of data reproduction, reproduces the first data by synthesizing the pieces of second data read from the plurality of first recording and reproducing means; computer-readable program code means that, when a fault occurs at one of the plurality of first recording and reproducing means (hereinafter referred to as the xe2x80x9cfaulty first recording and reproducing meansxe2x80x9d), if one of the pieces of second data is recorded in the faulty first recording and reproducing means, recovers such one of the pieces of second data recorded in the faulty first recording and reproducing means by reading the pieces of second data and the error correction code recorded in the plurality of first recording and reproducing means excluding the faulty first recording and reproducing means (hereinafter referred to as the xe2x80x9cfaultless recording and reproducing meansxe2x80x9d), and records the recovered one of the pieces of second data in a second recording and reproducing means; and computer-readable program code means that thereafter reproduces the first data by reading the pieces of second data recorded in the plurality of faultless first recording and reproducing means and the piece of second data recorded in the second recording and reproducing means, produces new pieces of second data by dividing the reproduced first data and generates a new error correction code, and allocates and records the new pieces of second data and the new error correction code to and in the plurality of faultless first recording and reproducing means, respectively.
In the second aspect of the invention, when faults occur at a plurality of recording and reproducing means having recorded pieces of second data obtained by dividing the first data, the first data is reproduced by reading the pieces of second data from the plurality of faultless recording and reproducing means. When new pieces of second data are produced by dividing the reproduced first data and allocated to a plurality of faultless recording and reproducing means, and if the new pieces of second data cannot be recorded in these faultless recording and reproducing means due to large volumes of data recorded in such faultless recording and reproducing means, then new pieces of second data are further produced by dividing the reproduced first data and the further newly produced pieces of second data are recorded in the faultless recording and reproducing means and an auxiliary recording and reproducing means. When a fault occurs, a piece of second data recorded in the faulty recording and reproducing means is recovered by using the error correction code, and the recovered piece of second data is recorded in the auxiliary recording and reproducing means. Thereafter, the first data is reproduced from the pieces of second data recorded in the faultless recording and reproducing means and the auxiliary recording and reproducing means, and the reproduced first data is divided, and the divided pieces of data are allocated to the faultless recording and reproducing means as new pieces of second data.
According to the second aspect of the present invention, when the reproduced first data is divided, and the divided pieces of data are allocated to the faultless recording and reproducing means as new pieces of second data, and if such new pieces of second data cannot be recorded due to, e.g., large volumes of data recorded in the faultless recording and reproducing means, then the reproduced first data is further divided and the further divided pieces of data are allocated to the faultless recording and reproducing means and the auxiliary recording and reproducing means.
As a result, even if a second fault occurs at one of the recording and reproducing means before the completion of a rebuild process, the first data can be obtained by recovering the piece of second data recorded in the second faulty recording and reproducing means. Hence, reliability can be improved. Further, since one of the pieces of second data can be allocated to the auxiliary recording and reproducing means, the recovery process can be performed efficiently while reserving one of th e recording and reproducing means as the auxiliary one.
Further, the piece of second data recorded in the faulty recording and reproducing means is recovered by using the error correction code, and the recovered piece of second data is recorded in the auxiliary recording and reproducing means. Thereafter, the first data is reproduced from the pieces of second data recorded in the faultless recording and reproducing means and the auxiliary recording and reproducing means, and the reproduced first data is divided and the divided pieces of data are allocated to the faultless recording and reproducing means as new pieces of second data.
As a result, even if the first data is read before the first data that has been synthesized after the occurrence of a fault is reallocated to and recorded in the plurality of the faultless recording and reproducing means, the first data can be recorded swiftly since the piece of second data recorded in the faulty recording and reproducing means is recovered in the auxiliary recording and reproducing means. When the allocation of the synthesized first data is complete, the auxiliary recording and reproducing means can be reserved again. Therefore, even if a fault occurs again at one of the recording and reproducing means before the completion of a rebuild process, a piece of second data recorded in the faulty recording and reproducing means is recovered and the first data is reproduced by using such recovered piece of second data. Hence, reliability can be improved.